#ifndef SENSOR_GLUCOSE_H
#define SENSOR_GLUCOSE_H

#include "sensor_include.h"


typedef enum
{
    GLUCOSE_OK,
    GLUCOSE_INITIALIZING,
    GLUCOSE_RECOMMEND_CAL,
    GLUCOSE_BLANKED,
    GLUCOSE_ERROR
} glucose_state;

// Public functions declaration

void Glu_Initialize( uint32 u32_calTime, fixed32 f32_calFactor, fixed32 f32_offset, fixed32 f32_naBias );
void Glu_SetCalFactor( uint32 u32_calTime, fixed32 f32_calFactor );
void Glu_SetOffset( uint32 u32_calTime, fixed32 f32_offset );
fixed32 Glu_GetCalFactor(void);
fixed32 Glu_GetTotalCalFactor(void);
fixed32 Glu_GetOffset(void);
fixed32 Glu_GetTotalOffset(void);
fixed32 Glu_GetNaBias(void);
logical Glu_IsCalUpdate(void);
fixed32 Glu_GetGlucose(void);
fixed32 Glu_GetDefaultGlucose(void);
fixed32 Glu_GetOrigGlucose(void);
fixed32 Glu_GetCurrentOrigGlucose(void);
fixed32 Glu_GetCurrentGlucose(void);
#if SENSOR_AUTOBASE
fixed32 Glu_GetAutoBaseGlucose(void);
fixed32 Glu_GetCurrentAutoBaseGlucose(void);
#endif
uint Glu_GetState(void);
void Glu_CalculateGlucose( uint32 u32_time );
logical Glu_Calibration( uint32 u32_time, fixed32 f32_glucose
#if SENSOR_AUTOBASE
                         , uint8 u8_limitScale
#endif
                         );


#endif // SENSOR_GLUCOSE_H
